﻿@{
    
    ViewBag.HeaderProperties = "id='Head1' runat='server'";
    ViewBag.Title = "Gruyas.com | Desktop";
}
@Html.X().ResourceManager()
@(Html.X().Desktop()
    .DesktopConfig(Html.X().DesktopConfig()
        .Wallpaper("../resources/wallpapers/Fuji.jpg")
        .ShortcutContextMenu(Menu => Menu
            .Add(Html.X().Menu()
                .Items(items => items
                    .Add(Html.X().MenuItem()
                        .Text("Compartir con ...")
                        .Icon(Icon.Share)
                    )
                    .Add(Html.X().MenuItem()
                        .Text("Comprimir (.zip)")
                        .Icon(Icon.PageWhiteZip)
                    )
                    .Add(Html.X().MenuItem()
                        .Text("Cortar")
                        .Icon(Icon.Cut)
                    )
                    .Add(Html.X().MenuItem()
                        .Text("Copiar")
                        .Icon(Icon.PageCopy)
                    )
                    .Add(Html.X().MenuItem()
                        .Text("Eliminar")
                        .Icon(Icon.FolderDelete) //(Icon.Delete)
                    )
                    .Add(Html.X().MenuItem()
                        .Text("Cambiar Nombre")
                        .Icon(Icon.ApplicationEdit) //Icon.FolderEdit)
                    )
                    .Add(Html.X().MenuItem()
                        .Text("Propiedades")
                        .Icon(Icon.Information)
                    )
                )
            )
        )
        .ContextMenu(Menu => Menu
            .Add(Html.X().Menu()
                .Items(items => items
                    .Add(Html.X().MenuItem()
                        .Text("Buscar")
                        .Icon(Icon.Zoom)
                    )
                    .Add(Html.X().MenuItem()
                        .Text("Ordenar por ...")
                        .Icon(Icon.SortAscending)
                    )
                    .Add(Html.X().MenuItem()
                        .Text("Pegar")
                        .Icon(Icon.PageWhitePaste)
                    )
                    .Add(Html.X().MenuItem()
                        .Text("Nueva Carpeta")
                        .Icon(Icon.FolderAdd)
                        .DirectEvents(directEvents => {
                            directEvents.Click.ExtraParams.Add(new Parameter("FolderName", "FUCKYEA", ParameterMode.Value));
                            directEvents.Click.ExtraParams.Add(new Parameter("Type", "Shared", ParameterMode.Value));
                            directEvents.Click.Url = "/Desktop/NewFolder";
                        })
                    
                    )
                    .Add(Html.X().MenuItem()
                        .Text("Personalizar")
                        .Icon(Icon.ColorWheel)
                    )
                )
            )
        )
    )
    .ID("Desktop1")
    .Modules(modules => modules
        .Add(Html.X().DesktopModule()
            .ModuleID("Notepad")
            .AutoRun(true)
            .Shortcut(Html.X().DesktopShortcut()
                .Name("Notepad")
                .IconCls("x-notepad-shortcut")
                .SortIndex(2)
            )
            .Window(window => window
                .Add(Html.X().Window()
                    .Title("Notepad")
                    .Width(600)
                    .Height(400)
                    .AnimCollapse(false)
                    .Border(false)
                    .HideMode(HideMode.Offsets)
                    .Layout("FitLayout")
                    .CloseAction(CloseAction.Destroy)
                    .Hidden(false)
                    .Icon(Icon.ApplicationForm)
                    .Items(items => items
                        .Add(Html.X().HtmlEditor()
                            .Text("asd")
                        )
                    )
                )
            )
        )
    )
 )